home *** CD-ROM | disk | FTP | other *** search
/ QuickTime - The Beta Release / QuickTime - The Beta Release.iso / Programming Stuff / Interfaces / Movies Rez Interfaces / Image Codec.r
Text File  |  1991-09-06  |  7KB  |  194 lines

  1. /*
  2.     File:        Image Codec.r
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Written by:    xxx put writers here xxx
  7.  
  8.     Copyright:    © 1991 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     This file is used in these builds: Warhol
  11.  
  12.     Change History (most recent first):
  13.  
  14.          <5>     8/20/91    MK        add cdci tmpl def
  15.          <4>      8/1/91    MK        change JPEG to jpeg
  16.          <3>      5/6/91    MK        official Doug-like names
  17.          <2>      5/1/91    MK        add common names
  18.          <1>      5/1/91    MK        first checked in
  19.  
  20.     To Do:
  21. */
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. /*
  33.  
  34.     This is the thing bundle resource, we need one for each 
  35.     compressor or decompressor thing.
  36.     
  37.     
  38. */
  39.  
  40.  
  41.  
  42. type 'thng' {
  43.     hex longint    type;
  44.     hex longint    subType;
  45.     hex longint    manufacturere;
  46.     hex    longint    flags;
  47.     hex    longint flagsMask;
  48.     hex longint    thingResType;    
  49.     int thingResID;
  50.     hex longint  thingNameResType;
  51.     int thingNameResID;
  52.     hex longint  thingInfoResType;
  53.     int thingInfoResID;
  54.     hex longint  thingIconResType;
  55.     int thingIconResID;
  56. };
  57.  
  58.  
  59. type 'cdec' {
  60. hex string;
  61. };
  62.  
  63.  
  64.  
  65.  
  66. #define    codecInfoDoes1                1            /* codec can work with 1-bit pixels */
  67. #define    codecInfoDoes2                2            /* codec can work with 2-bit pixels */
  68. #define    codecInfoDoes4                4            /* codec can work with 4-bit pixels */
  69. #define    codecInfoDoes8                8            /* codec can work with 8-bit pixels */
  70. #define    codecInfoDoes16                0x10        /* codec can work with 16-bit pixels */
  71. #define    codecInfoDoes32                0x20        /* codec can work with 32-bit pixels */
  72. #define    codecInfoDoesDither            0x40        /* codec can do ditherMode */
  73. #define    codecInfoDoesStretch        0x80        /* codec can stretch to arbitrary sizes */
  74. #define    codecInfoDoesShrink            0x100        /* codec can shrink to arbitrary sizes */
  75. #define    codecInfoDoesMask            0x200        /* codec can mask to clipping regions */
  76.             
  77. #define    codecInfoDoesTemporal        0x400        /* codec can handle temporal redundancy */
  78.  
  79. #define    codecInfoDoesDouble            0x800        /* codec can stretch to double size exactly */
  80. #define    codecInfoDoesQuad            0x1000        /* codec can stretch to quadruple size exactly */
  81. #define    codecInfoDoesHalf            0x2000        /* codec can shrink to half size */
  82. #define    codecInfoDoesQuarter        0x4000        /* codec can shrink to quarter size */
  83.  
  84. #define    codecInfoDoesRotate            0x8000        /* codec can rotate on decompress */
  85. #define    codecInfoDoesHorizFlip        0x10000        /* codec can flip horizontally on decompress */
  86. #define    codecInfoDoesVertFlip        0x20000        /* codec can flip vertically on decompress */
  87. #define    codecInfoDoesSkew            0x40000        /* codec can skew on decompress */
  88. #define    codecInfoDoesBlend            0x80000        /* codec can blend on decompress */
  89. #define    codecInfoDoesWarp            0x100000    /* codec can warp arbitrarily on decompress */
  90. #define    codecInfoDoesRecompress        0x200000    /* codec can recompress image without accumulating errors */
  91.  
  92.  
  93. #define    codecInfoDepth1                1            /* compressed data at 1 bpp depth available */
  94. #define    codecInfoDepth2                2            /* compressed data at 2 bpp depth available */
  95. #define    codecInfoDepth4                4            /* compressed data at 4 bpp depth available */
  96. #define    codecInfoDepth8                8            /* compressed data at 8 bpp depth available */
  97. #define    codecInfoDepth16            0x10        /* compressed data at 16 bpp depth available */
  98. #define    codecInfoDepth32            0x20        /* compressed data at 32 bpp depth available */
  99. #define    codecInfoDepth24            0x40        /* compressed data at 24 bpp depth available */
  100. #define    codecInfoDepth33            0x80        /* compressed data at 1 bpp monochrome depth  available */
  101. #define    codecInfoDepth34            0x100        /* compressed data at 2 bpp grayscale depth available */
  102. #define    codecInfoDepth36            0x200        /* compressed data at 4 bpp grayscale depth available */
  103. #define    codecInfoDepth40            0x400        /* compressed data at 8 bpp grayscale depth available */
  104. #define    codecInfoStoresClut            0x800        /* compressed data can have custom cluts */
  105.  
  106.  
  107.     /*
  108.     
  109.     This is the basic codecInfo structure ( see Image Compression.h ). Each codec should have
  110.     one of these resources which it should return with the GetCodecInfo call.
  111.     
  112.     */
  113.  
  114.  
  115. type 'cdci' {
  116.     pstring[31];
  117.     hex integer    version;
  118.     hex integer    revlevel;
  119.     hex longint    vendor;
  120.     hex longint    decompressFlags;
  121.     hex longint    compressFlags;
  122.     hex longint    formatFlags;
  123.     byte        compressionAccuracy;
  124.     byte        decompressionAccuracy;
  125.     integer        compressionSpeed;
  126.     integer        decompressionSpeed;
  127.     byte        compressionLevel;
  128.     byte        resvd;
  129.     integer        minimumHeight;
  130.     integer        minimumWidth;
  131.     integer        decompressPipelineLatency;
  132.     integer        compressPipelineLatency;
  133.     longint        privateData;
  134. };
  135.  
  136.  
  137.  
  138. #define    compressorComponentType            'imco'
  139.  
  140. #define    decompressorComponentType        'imdc'
  141.  
  142. #define    appleRLECodecFormatType            'rle '
  143.  
  144. #define    appleVideoCodecFormatType        'rpza'
  145.  
  146. #define    rawCodecFormatType                'raw '
  147.  
  148. #define    JPEGCodecFormatType                'jpeg'
  149.  
  150. #define    oldJPEGCodecFormatType            'JPEG'
  151.  
  152.  
  153.  
  154.  
  155. #define    appleVideoCodecFormatName        "Video - AVC"
  156.  
  157. #define    appleRLECodecFormatName            "Animation - RLE"
  158.  
  159. #define    JPEGCodecFormatName                "Photo - JPEG"
  160.  
  161. #define    rawCodecFormatName                "None"
  162.  
  163.  
  164.  
  165.     /* this is a resedit template for cdci resources */
  166.  
  167.  
  168.  
  169. data 'TMPL' (128, "cdci") {
  170.     $"0B46 6F72 6D61 7420 4E61 6D65 5030 3146"            /* .Format NameP01F */
  171.     $"0756 6572 7369 6F6E 4857 5244 0852 6576"            /* .VersionHWRD.Rev */
  172.     $"6C65 7665 6C48 5752 4406 5665 6E64 6F72"            /* levelHWRD.Vendor */
  173.     $"544E 414D 0F44 6563 6F6D 7072 6573 7346"            /* TNAM.DecompressF */
  174.     $"6C61 6773 484C 4E47 0D43 6F6D 7072 6573"            /* lagsHLNG¬Compres */
  175.     $"7346 6C61 6773 484C 4E47 0B46 6F72 6D61"            /* sFlagsHLNG.Forma */
  176.     $"7446 6C61 6773 484C 4E47 1343 6F6D 7072"            /* tFlagsHLNG.Compr */
  177.     $"6573 7369 6F6E 4163 6375 7261 6379 4442"            /* essionAccuracyDB */
  178.     $"5954 1544 6563 6F6D 7072 6573 7369 6F6E"            /* YT.Decompression */
  179.     $"4163 6375 7261 6379 4442 5954 1043 6F6D"            /* AccuracyDBYT.Com */
  180.     $"7072 6573 7369 6F6E 5370 6565 6444 5752"            /* pressionSpeedDWR */
  181.     $"4412 4465 636F 6D70 7265 7373 696F 6E53"            /* D.DecompressionS */
  182.     $"7065 6564 4457 5244 1043 6F6D 7072 6573"            /* peedDWRD.Compres */
  183.     $"7369 6F6E 4C65 7665 6C44 4259 5408 5265"            /* sionLevelDBYT.Re */
  184.     $"7365 7276 6564 4642 5954 0D4D 696E 696D"            /* servedFBYT¬Minim */
  185.     $"756D 4865 6967 6874 4457 5244 0C4D 696E"            /* umHeightDWRD.Min */
  186.     $"696D 756D 5769 6474 6844 5752 4419 4465"            /* imumWidthDWRD.De */
  187.     $"636F 6D70 7265 7373 5069 7065 6C69 6E65"            /* compressPipeline */
  188.     $"4C61 7465 6E63 7944 5752 4417 436F 6D70"            /* LatencyDWRD.Comp */
  189.     $"7265 7373 5069 7065 6C69 6E65 4C61 7465"            /* ressPipelineLate */
  190.     $"6E63 7944 5752 4407 5072 6976 6174 6548"            /* ncyDWRD.PrivateH */
  191.     $"4C4E 47"                                            /* LNG */
  192. };
  193.  
  194.